<%@ page import="com.dailybule.java.bean.Emp" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Arrays" %><%--
  Created by IntelliJ IDEA.
  User: dailyblue
  Date: 2024/1/22
  Time: 09:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    Emp emp = new Emp();
    emp.setSal(9800.0);
    emp.setEmpno(1001);
    emp.setComm(200.0);
    emp.setJob("程序员");
    emp.setEnname("张三");
    emp.setHireDate("2024-10-9");
    emp.setMgr(7788);
    emp.setDeptNo(20);
    session.setAttribute("EMP", emp);

    List<String> list = Arrays.asList("aa", "bb", "cc");
    session.setAttribute("A", list);

%>
<%--错误--%>
${emp}
<hr/>
对象：${EMP}<br/>
属性：${EMP.enname} 获取的是getEnname()
${EMP.job}
<hr/>
集合：${A}<br/>
某个元素：${A[0]} ${A.get(0)}
</body>
</html>